﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CloudClip.Clip
{
    public class TextClipUnit : IClipUnit
    {
        public TextClipUnit(string sText)
        {
            _ClipText = sText;
        }

        private string _ClipText = "";

        public string ToText()
        {
            return _ClipText;
        }

        public string ToIntroduction()
        {
            if(_ClipText.Length < 40)
            {
                return _ClipText.Trim();
            }else
            {
                return _ClipText.Substring(0, 40).Trim() + "...";
            }
        } 
    }
}
